<!-- /* Description for file.
 * 寻访信息
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/resources
 * @since         ues
 * @version       V0.0.1
 * @modifiedby   会兵2011年0709
 * @lastmodified  会兵2011年0709
 */
 -->

<?php
echo $html->css ( 'tab' );
echo $javascript->link ( 'jquery' );
?>

<script type="text/javascript">
$(function()
		{
			$("#close").click(function(){
				window.close();
			});
			$("#addresume").click(function(){
				window_location_href('<?php echo ROOT_WEB_PATH; ?>/resumes/insertone');
			});
			$("#addtoproject").click(function(){
				$("#addparam").toggle();
			});
			$("#closediv").click(function(){
				$("#addparam").toggle();
			});
			$("#update").click(function(){
				window_location_href('<?php echo ROOT_WEB_PATH; ?>/visitorrecords/update/<?php echo $visitorrecord['Visitorrecord']['id'];?>');
			});
			
});

//项目公司与项目职位的关联菜单
$(function(){
	$("#company").change(function(){
		var IndustryDroptoplist = $(this).val();
		if(IndustryDroptoplist!="")
		{
			$.post("<?php echo ROOT_WEB_PATH; ?>/visitorrecords/getrecruitposition/",{
				Recruitposition : $(this).val()
				},
			function(data,textStatus){
					 $("#recruitposition:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					//	 alert($(this).attr("name"));
						 $("#recruitposition:eq(0)").append("<option></option>");
						 $("#recruitposition:eq(0)>option:last").val($(this).attr("name")).html($(this).text());
				 	 });
			});
		}
		else
		{
			$("#recruitposition:eq(0)>option").remove();
			$("#recruitposition:eq(0)").append("<option></option>");
			$("#recruitposition:eq(0)>option:last").val("").html("不选");
		}
	});
	//项目职位与项目的关联菜单
	$("#recruitposition").change(function(){
		var IndustryDroptoplist = $(this).val();
		if(IndustryDroptoplist!="")
		{
			$.post("<?php echo ROOT_WEB_PATH; ?>/visitorrecords/getcompanymanage/",{
				Projectmanagement : $(this).val()
				},
			function(data,textStatus){
					 $("#projectmanagement:eq(0)>option").remove();
					 $(data).find("aaa").each(function(){
					 $("#projectmanagement:eq(0)").append("<option></option>");
					 $("#projectmanagement:eq(0)>option:last").val($(this).attr("name")).html($(this).text());
				  });
				});
		}
		else
		{
			$("#projectmanagement:eq(0)>option").remove();
			$("#projectmanagement:eq(0)").append("<option></option>");
			$("#projectmanagement:eq(0)>option:last").val("").html("不选");
		}
	});
});


</script>
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Visitor Management');//一级目录
										   echo '>';echo __('Visitorrecord');//一级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('Customer Managements Detail',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->
<?php echo $form->create('Visitorrecord',array('action'=>'addtoproject/'.$visitorrecord['Visitorrecord']['id'],'type'=> 'post'));?>
<div style="display: none" class="toolbarStyle" id="addparam">
	<table width="100%" cellspacing="0" cellpadding="0" border="0"
	style="text-align: left">
		<tr>
			<td width="30px"></td>
			<td width="100px">公司名称： </td>
		    <td>
		    	<?php $options = array();
							foreach($companymanagelist as $eachrecord)
							{
								$options[$eachrecord['Companymanage']['id']] = $eachrecord['Companymanage']['name'];
							}
							echo $form->input('company',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'company'));		
						?>
		    </td>
		</tr>
    	<tr>
    		<td></td>
    		<td>职位名称：</td>
	    	<td>
	    	<?php $options = array();
						foreach($recruitpositionlist as $eachrecord)
						{
							$options[$eachrecord['Recruitposition']['name']] = $eachrecord['Recruitposition']['name'];
						}
						echo $form->input('recruitposition',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'recruitposition'));		
					?>
	   	 	</td>
	    </tr>
	    <tr>
		    <td></td>
		    <td>项目编号：</td>
		    <td>
		    	<?php $options = array();
							foreach($projectmanagementlist as $eachrecord)
							{
								$options[$eachrecord['Projectmanagement']['id']] = $eachrecord['Projectmanagement']['projectCode'];
							}
							echo $form->input('projectmanagement',array('empty' =>'不选','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1','id'=>'projectmanagement'));		
						?>
		    </td>
	    </tr>
		<tr>
		<td></td>
		<td></td>
		<td>
			<?php echo $form->button('确定',array('type'=>'submit','class'=>'btn2'));?>
			<?php echo $form->button('取消',array('id'=>'closediv','class'=>'btn2'));?>
		</td>

	</tr>
	</table>
</div>
<div class="tabflex">
<table width="95%" align=center border=0>
  <tr>
 	 <td>&nbsp;</td> 
     <td width="10%">
    	<?php echo $form->button('加入项目寻访',array('id'=>'addtoproject','class'=>'btn6'));?>
    <td width="10%">
    	<?php echo $form->button('简历入库',array('id'=>'addresume','class'=>'btn4'));?>
    </td>
    <td width="10%">	
    	<?php echo $form->button('修改',array('id'=>'update','class'=>'btn2'));?>
    	</td>
    <td width="10%">	
    	<?php echo $form->button('关闭',array('id'=>'close','class'=>'btn2'));?>
    </td>
    <td>&nbsp;</td> 
   </tr>
</table>
<fieldset><legend>基本信息</legend>
<table width="95%" cellpadding="0" cellspacing="0" style="text-align:left;padding-left:50px;" class="viewtable">
  <TR>
    <TD width="110px;">候选人姓名：</TD>
    <TD><?php echo $resume['Resume']['name'];?></TD>
    <TD width="110px;">
<!--   	 所属项目：-->
   	 </TD>
    <TD></TD></TR>
  <TR>
    <TD>性&nbsp;&nbsp;&nbsp;&nbsp;别：</TD>
    <TD><span ><?php echo $resume['Resume']['sex'];?></TD>
    <TD >出生日期：</TD>
    <TD><?php echo $resume['Resume']['birthday'];?></TD></TR>
  <TR>
    <TD><span>年&nbsp;&nbsp;&nbsp;&nbsp;龄：</TD>
    <TD><?php echo $resume['Resume']['age'];?></TD>
    <TD>学&nbsp;&nbsp;&nbsp;&nbsp;历：</TD>
    <TD><?php echo $resume['Resume']['professional'];?></TD></TR>
  <TR>
    <TD>手机号码：</TD>
    <TD><?php echo $resume['Resume']['mobilePhone'];?></TD>
    <TD>电子邮箱：</TD>
    <TD><?php echo $resume['Resume']['email'];?></TD></TR>
  <TR>
    <TD vAlign=top>当前行业：</TD>
    <TD><?php echo $resume['Resume']['industry'];?><br></TD>
    <TD vAlign=top>现在公司：</TD>
    <TD><?php echo $resume['Resume']['previousCompany'];?><br></TD></TR>
  <TR>
    <TD>职&nbsp;&nbsp;&nbsp;&nbsp;能：</TD>
    <TD><?php echo $resume['Resume']['competency'];?></TD>
    <TD>现在职位：</TD>
    <TD><?php echo $resume['Resume']['position'];?><br></TD></TR>
  <TR>
    <TD>工作电话：</TD>
    <TD><?php echo $resume['Resume']['tel'];?></TD>
    <TD>状&nbsp;&nbsp;&nbsp;&nbsp;态：</TD>
    <TD></TD></TR>
  <TR>
    <TD>简历等级：</span></TD>
    <TD><?php echo $resume['Resume']['resumerank'];?></TD>
    <TD>现工作开始时间：</TD>
    <TD><?php echo $resume['Resume']['startworkdate'];?></TD></TR>
  <TR>
    <TD>现工作地区：</TD>
    <TD><?php echo $resume['Resume']['workarea'];?></TD>
    <TD></TD>
    <TD></TD></TR>
  <TR>
    <TD>创&nbsp;建&nbsp;人：</TD>
    <TD><?php echo $resume['Resume']['creater'];?></TD>
    <TD>创建日期：</TD>
    <TD><?php echo $resume['Resume']['created'];?></TD></TR>
    </table>
</fieldset>
<fieldset>    
  <legend>入选原因</legend> 
<table width="95%" cellpadding="0" cellspacing="0" style="text-align:left;padding-left:50px;" class="viewtable">
	  <TR>
	    <TD><?php echo $visitorrecord['Visitor']['acceptanceCause']?></TR>
    </table>
</fieldset>	    
<fieldset>    
  <legend>背景调查</legend> 
<table width="95%" cellpadding="0" cellspacing="0"style="text-align:left;padding-left:50px;" class="viewtable">   
	  <TR>
	    <TD><?php echo $visitorrecord['Visitor']['backgroundInquiry']?></TD></TR>
    </table>
</fieldset>

<table width="96%" cellpadding="0" cellspacing="0"  border="0"  style="text-align:left;padding-left:10px;">
  <TR>
    <td><?php echo $visitorrecord['Visitorrecord']['id']?></td>
	<td><a>第1次寻访记录， </a></td>
	<td><a>寻访时间：<?php echo $visitorrecord['Visitorrecord']['visitorTime']?></a></td>
	<td><a>添加人：<?php echo $visitorrecord['Visitorrecord']['creater']?></a></td>
	<td><a>客户：<?php echo $visitorrecord['Projectmanagement']['projectCompany']?></a></td>
	<td><a>职位：<?php echo $visitorrecord['Projectmanagement']['projectCompanyPosition']?></a></td>
	<td><a>项目编号：<?php echo $visitorrecord['Projectmanagement']['projectCode']?></a></td>
	<td><a>寻访状态：<?php echo $visitorrecord['Visitorstate']['name']?></a></td>
 </TR>	
 <tr>
 	<td></td>
	<td colspan="7">
		<?php 
			echo $form->textarea('visitorMind',array('label'=>false,'class'=>'areaStyle','value'=>$visitorrecord['Visitorrecord']['visitorMind']));
		?>
	</td>
	</tr>
</TR>
</table>
<fieldset>    
  <legend>推荐记录</legend> 
 <table class="tab1">
	<tr>
		<th>推荐时间</th><th>推荐人</th><th>推荐公司</th><th>推荐职位</th><th>项目编号</th><th>招聘负责人</th><th>状态</th><th>是否完成</th><th>进度备注</th><th>推荐评语</th>
	</tr>
	<?php 
		foreach($candidates as $v)
		{
			echo "<tr><td nowrap='nowrap'>";
			echo $v['Candidate']['nominateTime'];
			echo "</td>";
			echo "<td nowrap='nowrap'>";
			echo $v['User']['username'];
			echo "</td>";
			echo "<td nowrap='nowrap'>";
			echo $v['Projectmanagement']['projectCompany'];
			echo "</td>";
			echo "<td nowrap='nowrap'>";
			echo $v['Projectmanagement']['projectCompanyPosition'];
			echo "</td>";
			echo "<td nowrap='nowrap'><a href='<?php echo ROOT_WEB_PATH; ?>/projectmanagements/initProjectManage/".$v['Candidate']['projectmanagement_id']."'>";
			echo $v['Projectmanagement']['projectCode'];
			echo "</a></td>";
			echo "<td nowrap='nowrap'>";
			echo $v['Projectmanagement']['projectManage'];
			echo "</td>";
			echo "<td nowrap='nowrap'>";
			echo $v['Projectmanagement']['projectStatue'];
			echo "</td>";
			echo "<td nowrap='nowrap'>";
			echo $v['Candidate']['hasfinish'];
			echo "</td>";
			echo "<td nowrap='nowrap'>";
			echo $v['Candidate']['memo'];
			echo "</td>";
			echo "<td nowrap='nowrap'>";
			echo $v['Candidate']['remark'];
			echo "</td></tr>";
		}
	?>
	</tr>
</table>
</fieldset>
<fieldset>    
  <legend>项目寻访</legend> 

    <table class="tab1">
	<tr>
		<th width="150px">候选人</th><th>项目编号</th><th>添加时间</th><th width="110px">添加人</th>
	</tr>
	<?php 
		foreach($candidates as $k => $v)
		{
			echo "<tr><td nowrap='nowrap'><a href='<?php echo ROOT_WEB_PATH; ?>/resumes/visitorinfo/".$v['Candidate']['resume_id']."'>";
			echo $v['Candidate']['name'];
			echo "</td>";
			echo "<td nowrap='nowrap'><a href='<?php echo ROOT_WEB_PATH; ?>/projectmanagements/initProjectManage/".$v['Candidate']['projectmanagement_id']."'>";
			echo $v['Projectmanagement']['projectCode'];
			echo "</a></td>";
			echo "<td nowrap='nowrap'>";
			echo $v['Candidate']['created'];
			echo "</td>";
			echo "<td nowrap='nowrap'>";
			echo $v['Candidate']['creater'];
			echo "</td></tr>";
		}
	?>
</table>
</fieldset>

<?php echo $form->end();?>
</div>
